package com.alex.core.contants.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author cb
 * @date 2019/10/16 11:18
 */
@AllArgsConstructor
@Getter
public enum ApiResponseEnum {
    //
    RE_LOGIN(-1, "重新登录"),
    SUCCESS(0, "响应成功"),
    SERVER_INTERNAL_ERROR(500, "系统出错"),
    PAGE_NOT_FOUND(404, "内容找不到"),
    BAD_REQUEST(400, "参数不合格"),
    UN_OAUTH(401, "访问受限"),
    // =============================================================
    // 通用模块，可使用101xxxx作为code
    // =============================================================
    FEIGN_INVOKE_ERROR(1010001, "远程调用出错"),
    SAVE_ERROR(1010002, "新增数据出错"),
    DELETE_ERROR(1010003, "删除数据出错"),
    UPDATE_ERROR(1010004, "修改数据出错"),
    QUERY_ERROR(1010005, "查询数据出错"),
    QUERY_RECORD_LIST_EMPTY(1010006, "列表为空"),
    QUERY_RECORD_IS_NULL(1010007, "记录为空"),
    PARAM_INVALID(1010008, "参数无效"),
    FEIGN_INVOKE_RESULT_IS_NULL_OR_EMPTY(1010009, "远程调用接口返回数据为空"),
    START_DATE_IS_AFTER_END_DATE(1010010, "开始时间不能大于结束时间"),
    PARAM_TENANT_ID_IS_BLANK(1010011, "参数中商户ID为空"),
    MACHINE_UNSUPPORTED_BILLING_TYPE(1010012, "不支持的收费类型"),
    USER_DEFINED_ERROR(9999999, "用户自定义错误信息"),

    // =============================================================
    // Business模块，可使用201xxxx作为code
    // =============================================================

    // =============================================================
    // Device模块，可使用202xxxx作为code
    // =============================================================
    DEVICE_STATION_HAS_DEVICE(2020001, "站点下存在设备"),
    DEVICE_IM_CODE_EXIST(2020002, "设备IM号已存在"),
    DEVICE_NUMBER_EXIST(2020003, "设备编号已存在"),
    DEVICE_TOTAL_WAYS_NOT_VALID(2020004, "充电设备路数不符合"),
    DEVICE_LOGOUT_ID_LIST_IS_EMPTY(2020005, "选择需要注销的设备"),
    DEVICE_IS_NOT_ACTIVED(2020006, "设备未激活无法注销"),
    DEVICE_QRCODE_ID_LIST_IS_EMPTY(2020007, "选择需要下载二维码的设备"),
    DEVICE_INSTALL_TIME_PARAM_INVALID(2020008, "按时间收费参数无效"),
    DEVICE_INSTALL_POW_PARAM_INVALID(2020009, "按功率收费参数无效"),
    DEVICE_INSTALL_ELECTRIC_PARAM_INVALID(2020010, "按电量收费参数无效"),
    DEVICE_IS_ACTIVED(2020011, "设备已激活，不能再次安装"),
    DEVICE_WAY_IS_NOT_FREE(2020012, "设备端口不是空闲状态"),
    DEVICE_WAY_IS_NOT_USING(2020013, "设备端口不是使用中状态"),
    DEVICE_ANNUAL_FEE_END_DATE_INVALID(2020014, "设备年费不在有效期内"),
    DEVICE_WAYS_IS_EMPTY(2020015, "设备路数为空"),
    DEVICE_STATION_IS_NULL(2020016, "设备站点不存在"),
    DEVICE_RESET_TIMES_OUT_OF_RANGE(2020017, "设备重启次数超出限制"),
    DEVICE_RESET_ERROR(2020018, "设备重启失败"),
    DEVICE_PORT_RESET_ERROR(2020019, "设备端口重置失败"),
    DEVICE_INSTALL_RECORD_ANNUAL_ERROR(2020020, "设备安装记录年费出错"),
    DEVICE_INSTALL_DEVICE_NUMBER_NOT_MATCH(2020021, "填写的设备编码和设备录入时不匹配"),
    DEVICE_RUN_PORTS_IS_EMPTY(2020022, "请选择正确的端口开启充电"),
    DEVICE_SOCKET_NOT_TIME(2020023, "Socket机器不是按时间收费"),
    DEVICE_TYPE_NOT_MATCH(2020024, "选择的设备类型和数据库中不匹配"),
    DEVICE_IS_NOT_UN_FACTORY(2020025, "设备不是未出厂状态，不能操作"),
    DEVICE_CAR_ONLY_SUPPORT_ELECTRICITY(2020026, "汽车设备仅支持按电量收费"),
    DEVICE_IS_NOT_UN_ACTIVED(2020027, "设备不是未激活，请先注销再返厂"),
    DEVICE_IS_NOT_UN_ACTIVED_CANNOT_INSTALL(2020028, "设备不是未激活，不能安装"),

    // =============================================================
    // Order模块，可使用203xxxx作为code
    // =============================================================
    ORDER_NOTIN_REFUND_TYPE(2030001,"订单不属于可退款类型"),
    ORDER_WAITING_FOR_DEDUCTION(2030002, "等待余额扣款"),
    // =============================================================
    // Settlement模块，可使用204xxxx作为code
    // =============================================================
    SETTLEMENT_PROLONG_DEVICE_ANNUAL_FEE_UP_TIME_ERROR(2040001, "延长设备到期时间出错"),
    SETTLEMENT_DEVICE_STATISTIC_ERROR(2040002, "统计设备到期数据出错"),
    SETTLEMENT_DEVICE_END_DATE_ERROR(2040003, "选择时间不能小于到期时间"),

    ;
    private Integer code;
    private String errorMsg;
}
